From afd624bf4ba02d021b156bf478311fa875f7dcce Mon Sep 17 00:00:00 2001 From: Daniel Boles Date: Tue, 29 Aug 2017 19:00:03 +0100 Subject: [PATCH] =?utf8?q?TextView:=20:border-width=20broke=20window?= =?utf8?q?=E2=86=92widget=20coords?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Do the converse of commit bd7c87c762c75bbb8dfb5fed23964651188ef206 so that a TextView with Container:border-width > 0 does not get its handles and magnified region shifted up/left from where they should be. https://bugzilla.gnome.org/show_bug.cgi?id=786986 --- gtk/gtktextview.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index f267c6c02d..61e6f63123 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -5070,6 +5070,10 @@ _text_window_to_widget_coords (GtkTextView *text_view, gint *y) { GtkTextViewPrivate *priv = text_view->priv; + gint border_width = gtk_container_get_border_width (GTK_CONTAINER (text_view)); + + *x += border_width; + *y += border_width; if (priv->top_window) (*y) += priv->top_window->requisition.height; -- 2.30.2